Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of the report_builder #710

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

Swatinem
Copy link
Contributor

I think the intention of the report_builder setting was to build a Report from various database tables, instead of from the report_json blob.

However, it is unclear if that is actually faster, as some of the involved tables are slow to query, and the files_array field was doing a storage request anyway.

So the code was still doing two storage requests (chunks and files_array) plus various SELECTs, instead of doing just two storage requests (report_json and chunks).

@Swatinem Swatinem requested a review from a team September 16, 2024 13:04
@Swatinem Swatinem self-assigned this Sep 16, 2024
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (32e4f7f) to head (25af637).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
- Coverage   98.08%   98.07%   -0.02%     
==========================================
  Files         432      432              
  Lines       36292    36066     -226     
==========================================
- Hits        35598    35370     -228     
- Misses        694      696       +2     
Flag Coverage Δ
integration 98.07% <100.00%> (-0.02%) ⬇️
unit 98.07% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.97% <100.00%> (-0.04%) ⬇️
OutsideTasks 98.11% <100.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
services/notification/notifiers/tests/conftest.py 100.00% <100.00%> (ø)
services/report/__init__.py 96.85% <100.00%> (-0.10%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/backfill_commit_data_to_storage.py 97.29% <100.00%> (ø)
.../unit/test_backfill_commit_data_to_storage_task.py 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

@codecov-staging
Copy link

codecov-staging bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
- Coverage   98.08%   98.07%   -0.02%     
==========================================
  Files         432      432              
  Lines       36292    36066     -226     
==========================================
- Hits        35598    35370     -228     
- Misses        694      696       +2     
Flag Coverage Δ
integration 98.07% <100.00%> (-0.02%) ⬇️
unit 98.07% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.97% <100.00%> (-0.04%) ⬇️
OutsideTasks 98.11% <100.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
services/notification/notifiers/tests/conftest.py 100.00% <100.00%> (ø)
services/report/__init__.py 96.85% <100.00%> (-0.10%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/backfill_commit_data_to_storage.py 97.29% <100.00%> (ø)
.../unit/test_backfill_commit_data_to_storage_task.py 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

@codecov-qa
Copy link

codecov-qa bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (32e4f7f) to head (25af637).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
- Coverage   98.08%   98.07%   -0.02%     
==========================================
  Files         432      432              
  Lines       36292    36066     -226     
==========================================
- Hits        35598    35370     -228     
- Misses        694      696       +2     
Flag Coverage Δ
integration 98.07% <100.00%> (-0.02%) ⬇️
unit 98.07% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.97% <100.00%> (-0.04%) ⬇️
OutsideTasks 98.11% <100.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
services/notification/notifiers/tests/conftest.py 100.00% <100.00%> (ø)
services/report/__init__.py 96.85% <100.00%> (-0.10%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/backfill_commit_data_to_storage.py 97.29% <100.00%> (ø)
.../unit/test_backfill_commit_data_to_storage_task.py 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

Copy link

codecov-public-qa bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (32e4f7f) to head (25af637).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
- Coverage   98.08%   98.07%   -0.02%     
==========================================
  Files         432      432              
  Lines       36292    36066     -226     
==========================================
- Hits        35598    35370     -228     
- Misses        694      696       +2     
Flag Coverage Δ
integration 98.07% <100.00%> (-0.02%) ⬇️
unit 98.07% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.97% <100.00%> (-0.04%) ⬇️
OutsideTasks 98.11% <100.00%> (-0.02%) ⬇️
Files Coverage Δ
services/notification/notifiers/tests/conftest.py 100.00% <100.00%> (ø)
services/report/__init__.py 96.85% <100.00%> (-0.10%) ⬇️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/backfill_commit_data_to_storage.py 97.29% <100.00%> (ø)
.../unit/test_backfill_commit_data_to_storage_task.py 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

I think the intention of the `report_builder` setting was to build a `Report` from various database tables,
instead of from the `report_json` blob.

However, it is unclear if that is actually faster, as some of the involved tables are slow to query, and the `files_array` field was doing a storage request anyway.

So the code was still doing two storage requests (`chunks` and `files_array`) plus various SELECTs, instead of doing just two storage requests (`report_json` and `chunks`).
@Swatinem Swatinem marked this pull request as ready for review September 30, 2024 10:10
@Swatinem Swatinem added this pull request to the merge queue Oct 1, 2024
Merged via the queue into main with commit 64598f2 Oct 1, 2024
18 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/rm-reportbuilder branch October 1, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants